﻿using System;

namespace SharpSqlAnalyzer.nodes.hive
{
	// Token: 0x0200041C RID: 1052
	public class THivePrivilegeDef : TParseTreeNode
	{
		// Token: 0x1700094A RID: 2378
		// (get) Token: 0x060028A7 RID: 10407 RVA: 0x0033CBC0 File Offset: 0x0033ADC0
		public virtual TObjectNameList Columns
		{
			get
			{
				return this.columns;
			}
		}

		// Token: 0x1700094B RID: 2379
		// (get) Token: 0x060028A8 RID: 10408 RVA: 0x0033CBC8 File Offset: 0x0033ADC8
		public virtual EHivePrivilegeType PrivilegeType
		{
			get
			{
				return this.privilegeType;
			}
		}

		// Token: 0x060028A9 RID: 10409 RVA: 0x0033CBD0 File Offset: 0x0033ADD0
		public override void init(object arg1, object arg2)
		{
			int tokencode = ((TSourceToken)arg1).tokencode;
			if (tokencode <= 309)
			{
				if (tokencode <= 304)
				{
					if (tokencode != 301)
					{
						if (tokencode == 304)
						{
							this.privilegeType = EHivePrivilegeType.update;
						}
					}
					else
					{
						this.privilegeType = EHivePrivilegeType.select;
					}
				}
				else if (tokencode != 307)
				{
					if (tokencode == 309)
					{
						this.privilegeType = EHivePrivilegeType.index;
					}
				}
				else
				{
					this.privilegeType = EHivePrivilegeType.create;
				}
			}
			else if (tokencode <= 339)
			{
				if (tokencode != 314)
				{
					if (tokencode == 339)
					{
						this.privilegeType = EHivePrivilegeType.all;
					}
				}
				else
				{
					this.privilegeType = EHivePrivilegeType.drop;
				}
			}
			else if (tokencode != 426)
			{
				if (tokencode != 473)
				{
					if (tokencode == 539)
					{
						this.privilegeType = EHivePrivilegeType.show_database;
					}
				}
				else
				{
					this.privilegeType = EHivePrivilegeType.@lock;
				}
			}
			else
			{
				this.privilegeType = EHivePrivilegeType.alter;
			}
			this.columns = (TObjectNameList)arg2;
		}

		// Token: 0x060028AA RID: 10410 RVA: 0x0033CCB5 File Offset: 0x0033AEB5
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x060028AB RID: 10411 RVA: 0x0033CCC5 File Offset: 0x0033AEC5
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x04001E68 RID: 7784
		private EHivePrivilegeType privilegeType;

		// Token: 0x04001E69 RID: 7785
		private TObjectNameList columns;
	}
}
